const {bfmetaSDK} = require('../util/util')
//1.创建模板
const creatNFTfactory = () => {
    return (req, res, next) => {
      try {
        bfmetaSDK.api.transaction.createIssueEntityFactory(req.body).then(result => {
          res.status(200).send(result)
        })
        console.log(req.body)
      } catch (error) {
        next(error)
      }
    }
  }
  // 2.广播模板
  const BTFA = () => {
    return (req, res, next) => {
      try {
        bfmetaSDK.api.transaction.broadcastIssueEntityFactory(req.body).then(result => {
          res.status(200).send(result)
        })
      } catch (error) {
        next(error)
      }
    }
  }
  
module.exports = {creatNFTfactory,BTFA}